<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  var obj = {
    name:'freddy',
    age:30,
    job:"web",
  }

  // for in
  for (const objKey in obj) {
    console.log(objKey+"==="+obj[objKey])
  }

  //Object.keys \ Object.values
  console.log(Object.keys(obj))
  console.log(Object.values(obj))

  // 使用Object.getOwnPropertyNames
  Object.getOwnPropertyNames(obj).forEach((key)=>{
    console.log(key +"====" + obj[key])
  })
</script>
</body>
</html>